
import java.util.HashMap;
import java.util.Scanner;

/**
 * Created with IDEA
 * author:ju bai
 * Date:2021/4/12
 * Time:16:41
 **/
public class Main2 {
    /**
     * 每日一题-删除公共字符
     * 100%
     *
     * @param args
     */
    public static void main1(String[] args) {
        Scanner sc = new Scanner(System.in);
        while (sc.hasNext()) {
            String str1 = sc.nextLine();
            String str2 = sc.nextLine();
            func(str1, str2);
        }
    }


    public static void func(String str1, String str2) {
        char[] array = str1.toCharArray();//将str1放进字符串数组中
        for (int i = 0; i < array.length; i++) {
            String ch = array[i] + "";
            if (!str2.contains(ch)) {//str2若与其不相等，输出
                System.out.print(ch);
            }
        }
    }

    /**
     * HashMap方法
     * @param args
     */
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        HashMap<Character,Integer> map = new HashMap<>();
        while(sc.hasNext()){
            String str1 = sc.nextLine();
            String str2 = sc.nextLine();
            for (int i = 0; i < str2.length(); i++) {
                if (map.get(str2.charAt(i))==null){
                    //走到这，表示还没有放这个
                    map.put(str2.charAt(i),1);//第一次放，出现了一次
                }else{
                    //走到这，表示放过了，给value值+1
                    map.put(str2.charAt(i),map.get(str2.charAt(i))+1);//在原有基础上+1
                }
            }
            StringBuffer str = new StringBuffer();
            for (int i = 0; i < str1.length(); i++) {
                if(map.get(str1.charAt(i))==null){
                    str.append(str1.charAt(i));
                }
            }
            System.out.println(str.toString());
        }
    }
}
